package com.aaa.three.service.impl;

import com.aaa.three.mapper.PatientDepartmentMapper;
import com.aaa.three.pojo.domain.AdminDept;
import com.aaa.three.pojo.domain.AdminOffice;
import com.aaa.three.result.AjaxResult;
import com.aaa.three.service.PatientDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @PACKAGE_NAME: com.aaa.three.service.impl
 * @NAME: PatientDepartmentServiceImpl
 * @USER: Tprairie
 * @DATE: 2022/2/18
 * @PROJECT_NAME: three
 */
@Service
public class PatientDepartmentServiceImpl implements PatientDepartmentService {
    @Autowired
    private PatientDepartmentMapper patientDepartmentMapper;
    @Override
    public AjaxResult listDepartmentOne() {
        List<AdminDept> adminDepts=patientDepartmentMapper.listDepartmentOne();
        return AjaxResult.success(adminDepts);
    }

    @Override
    public AjaxResult listDepartmentTwo(Integer id) {
        List<AdminOffice> officeList=patientDepartmentMapper.listDepartmentTwo(id);
        return AjaxResult.success(officeList);
    }
}
